package com.zhkj.crawl.config;

import cn.hutool.core.date.DateUtil;

public interface Constants {
    String APP_NAME = "crawl-service";

//    String UA = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36";
//    String UA = "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36";
    String UA = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36";
    String URL_IP = "https://www.ip.cn/api/index?ip=&type=0";

//    String PROXY_HOST = "124.205.155.153";
//    int PROXY_PORT = 9090;
    String PROXY_HOST = "tps149.kdlapi.com";
    int PROXY_PORT = 15818;
    String PROXY_USERNAME = "t12736716818114";
    String PROXY_PASSWORD = "haec3zv5";

    String PROXY_SET_STRING = "-DproxySet=true -Dhttp.proxyHost=127.0.0.1 -Dhttp.proxyPort=8888";
    boolean isWindows = System.getProperty("os.name").toLowerCase().contains("win");

    /**
     * 获取当前年月
     * @return 202112
     */
    static String getCurMon(){
        String[] dateSplit = DateUtil.date().toDateStr().split(StringPool.DASH);
        return dateSplit[0] + dateSplit[1];
    }

}
